/*
 * Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

package com.inspur.edp.lcm.metadata.core;

import com.inspur.edp.lcm.metadata.api.entity.GspMetadata;
import com.inspur.edp.lcm.metadata.api.entity.MetadataDto;
import com.inspur.edp.lcm.metadata.api.service.NoCodeService;
import java.util.List;

/**
 * 功能描述:
 *
 * @ClassName: NoCodeServiceImpl
 * @Author: Fynn Qi
 * @Date: 2021/5/25 15:07
 * @Version: V1.0
 */
public class NoCodeServiceImpl implements NoCodeService {

    @Override
    public GspMetadata initMetadata(GspMetadata metadata) {
        return NoCodeCoreService.getInstance().initMetadata(metadata);
    }

    @Override
    public GspMetadata saveMetadata(GspMetadata metadata) {
        return NoCodeCoreService.getInstance().saveMetadata(metadata);
    }

    @Override
    public GspMetadata getMetadata(String metadataId) {
        return NoCodeCoreService.getInstance().getMetadata(metadataId);
    }

    @Override
    public boolean publishMetadata(String metadataId) {
        return NoCodeCoreService.getInstance().publishMetadata(metadataId);
    }

    @Override
    public void deleteMetadata(String metadataId) {
        NoCodeCoreService.getInstance().deleteMetadata(metadataId);
    }

    @Override public List<MetadataDto> getMetadataListInBO(String bizObjectID) {
        return NoCodeCoreService.getInstance().getMetadataListInBO(bizObjectID);
    }
}
